package com.freightoa.sgl

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.freightoa.foundation.result.Router
import com.freightoa.foundation.result.Routes
import com.freightoa.sgl_login.presentation.screen.LoginActivity
import com.lhgray.sglhome.presentation.ui.activity.HomeActivity
import javax.inject.Inject

// :common 模块的 GlobalRouter.kt
class GlobalRouter @Inject constructor() : Router {

    override fun navigateTo(context: Context, path: String, data: Bundle?) {
        // 统一处理所有跳转逻辑
        when (path) {
            Routes.LOGIN -> context.startActivity(Intent(context, LoginActivity::class.java))
            Routes.HOME -> context.startActivity(Intent(context, HomeActivity::class.java))
        }
    }
}